<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/style.css">
<script language="JavaScript"
	src="<%=request.getContextPath()%>/js/util.js"></script>
<title><tiles:insert flush="false" attribute="title" /></title>
</head>
<body>
<f:view>
	<f:loadBundle basename="resource.bundle.messages" var="messages" />
	<h:form>
		<rich:panel header="#{messages['create.agent.commission.schema.range']}">
			<h:panelGrid>
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>

			<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
				<h:outputText></h:outputText>
				<t:message for="code" styleClass="error"></t:message>
			
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="code" value="#{messages['code']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputText id="code" required="true" size="50" maxlength="50" styleClass="standardText" value=""></t:inputText>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="name" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="name" value="#{messages['name']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputText id="name" required="true" size="50" maxlength="50" styleClass="standardText" value=""></t:inputText>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="desc" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="desc" value="#{messages['desc']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputTextarea id="desc" cols="20" rows="5" value=""></t:inputTextarea>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="commissiontype" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="commissiontype" value="#{messages['accumulate.type']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneRadio id="commissiontype" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="Accumulate" itemValue="" />
						<f:selectItem itemLabel="Non-Accumulate" itemValue="" />
					</t:selectOneRadio>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="type" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="type" value="#{messages['commission.type']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneRadio id="type" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="By Range" itemValue="" />
						<f:selectItem itemLabel="By Category" itemValue="" />
					</t:selectOneRadio>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="membershipcategory" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="membershipcategory" value="#{messages['membership.category']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneMenu id="membershipcategory" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
						<f:selectItem itemLabel="Gold" itemValue="" />
						<f:selectItem itemLabel="Previleage" itemValue="" />
					</t:selectOneMenu>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="valuetype" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="valuetype" value="#{messages['membership.category']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneRadio id="valuetype" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="Fixed Value" itemValue="" />
						<f:selectItem itemLabel="Percentage" itemValue="" />
					</t:selectOneRadio>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="value" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="value" value="#{messages['value']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputText id="value" value=""></t:inputText>
				</h:panelGroup>
			
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['payment.range']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:panelGrid columns="4" width="60%">
						<h:outputText  value="#{messages['from']}" styleClass="standardText_Label" />
						<h:outputText  value="#{messages['to']}" styleClass="standardText_Label" />
						<h:outputText  value="#{messages['percent']}" styleClass="standardText_Label" />
						<h:outputText  value="#{messages['action']}" styleClass="standardText_Label" />
						
						<t:inputText readonly="true" size="10" maxlength="10" styleClass="standardText" value="1"></t:inputText>
						<t:inputText readonly="true" size="10" maxlength="10" styleClass="standardText" value="10000"></t:inputText>
						<t:panelGroup>
							<t:inputText required="true" size="10" maxlength="10" styleClass="standardText" value="">
								<f:convertNumber pattern="##0.0"/>
								<f:validateLength maximum="100" minimum="0"/>
							</t:inputText>
							<f:verbatim>&nbsp;</f:verbatim>
							<h:outputText styleClass="standardText_Label" value="#{messages['percent']}"></h:outputText>
						</t:panelGroup>
						<t:outputText></t:outputText>
						
						<t:inputText readonly="true" size="10" maxlength="10" styleClass="standardText" value="10000"></t:inputText>
						<t:inputText size="10" maxlength="10" styleClass="standardText" value=""></t:inputText>
						<t:panelGroup>
							<t:inputText  required="true" size="10" maxlength="10" styleClass="standardText" value="">
								<f:convertNumber pattern="##0.0"/>
								<f:validateLength maximum="100" minimum="0"/>
							</t:inputText>
							<f:verbatim>&nbsp;</f:verbatim>
							<h:outputText styleClass="standardText_Label" value="#{messages['percent']}"></h:outputText>
						</t:panelGroup>
						<h:commandLink value="Remove" styleClass="standardText"></h:commandLink>
						
						<t:outputText></t:outputText>
						<t:outputText></t:outputText>
						<t:outputText></t:outputText>
						<h:commandLink value="Add More" styleClass="standardText"></h:commandLink>
					</t:panelGrid>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="effectivedate" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="effectivedate" value="#{messages['effective.date']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputCalendar
			    	id="effectivedate"
						monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
						currentDayCellClass="currentDayCell" value=""
						renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
						popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
						renderPopupButtonAsImage="true"
						styleClass="standardText" required="true">
			    	</t:inputCalendar>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="expirydate" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="expirydate" value="#{messages['expiry.date']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputCalendar
			    	id="expirydate"
						monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
						currentDayCellClass="currentDayCell" value=""
						renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
						popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
						renderPopupButtonAsImage="true"
						styleClass="standardText" required="true">
			    	</t:inputCalendar>
			    </h:panelGroup>
				
			</t:panelGrid>
			
			<rich:spacer height="30"></rich:spacer>
			
			<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
				<h:outputText></h:outputText>
				<t:panelGrid columns="2">
					<h:commandButton value="#{messages['create']}" styleClass="button"></h:commandButton>
					<h:commandButton value="#{messages['back']}" styleClass="button"></h:commandButton>
				</t:panelGrid>
			</t:panelGrid>
			
		</rich:panel>
	</h:form>
</f:view>
</html>